package com.xxgc.eow.entity;

import com.baomidou.mybatisplus.annotation.FieldFill;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import java.io.Serializable;
import java.time.LocalDateTime;
import java.util.List;

import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Getter;
import lombok.Setter;

/**
 * <p>
 * 评论
 * </p>
 *
 * @author Mr.Abel
 * @since 2023-05-22
 */
@Getter
@Setter
@Schema(name = "Comment", description = "评论")
public class Comment implements Serializable {

    private static final long serialVersionUID = 1L;

    @Schema(description = "评论id")
    @TableId(value = "comment_id", type = IdType.AUTO)
    private Integer commentId;

    @Schema(description = "文章id")
    private Integer article;

    @Schema(description = "用户id")
    private Integer userId;

    @Schema(description = "评论类型")
    private Integer commentType;

    @Schema(description = "评论内容")
    private String commentContent;

    @Schema(description = "电子")
    private Integer commentLike;

    @Schema(description = "收藏")
    private Integer commentCollect;

    @Schema(description = "创建时间")
    @TableField(fill = FieldFill.INSERT)
    private LocalDateTime createTime;

    @Schema(description = "销毁时间")
    private LocalDateTime destroyTime;

    @Schema(description = "假删除状态")
    private Byte tip;

    @Schema(description = "二级评论")
    private List<Secondaycomment> secondaycomments;

    @Override
    public String toString() {
        return "Comment{" +
                "commentId=" + commentId +
                ", article=" + article +
                ", userId=" + userId +
                ", commentType=" + commentType +
                ", commentContent='" + commentContent + '\'' +
                ", commentLike=" + commentLike +
                ", commentCollect=" + commentCollect +
                ", createTime=" + createTime +
                ", destroyTime=" + destroyTime +
                ", tip=" + tip +
                ", secondaycomments=" + secondaycomments +
                '}';
    }
}
